package cn.edu.tju.se.auth.repository;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import cn.edu.tju.se.auth.domain.Group;
import cn.edu.tju.se.auth.domain.User;

@Repository
public interface UserRepository extends JpaRepository<User, Long>{
	public User findByUsername(final String username);
	public User findByEmail(String email);
	public User findByPhone(String phone);
	public Page<User> findAll(Pageable pageable);
	public List<User> findByPrimaryGroupIn(List<Group> groups);
}
